using System;
using System.Collections.Generic;
using MvcCms.Data;
using MvcCmsOptIn.Data.Entities;
using MvcCms.Service.Models;
using System.Linq;

namespace MvcCmsOptIn.Service
{
    public interface IOptInService
    {
        bool DeleteTrackingLink(int linkId);
        IEnumerable<OptInLinkTracking> ListTrackingLinks(int newsLetterId);
        bool CreateTrackingLink(OptInLinkTracking linkToCreate);
        bool EditTrackingLink(OptInLinkTracking trackingLinkToEdit);
        OptInLinkTracking GetTrackingLink(int linkTrackingID);

        bool ImportSubscribersFromPortal(bool useHTML, bool confirmed, string ipAddress, IEnumerable<OptInList> listsToAddTo, string roles);
        bool ImportSubscribersFromCSV(bool useHTML, bool confirmed, string ipAddress, IEnumerable<OptInList> listsToAddTo, IEnumerable<OptInSubscriber> subscribersToAdd, bool doNotAddExisting);
        bool DeleteSubscriber(int subscriberId);
        bool DeleteSubscriberList(int subscriberListId);
        bool EditSubscriber(OptInSubscriber subscriberToEdit);
        OptInSubscriber GetSubscriber(int subscriberId);
        OptInSubscriber GetSubscriber(string email);
        bool CreateSubscriber(OptInSubscriber subscriberToCreate);
        IEnumerable<OptInSubscriber> ListSubscribers();
        DtoOptInSubscribers ListSubscribers(DataTablesRequest dataTablesRequest, string columnsToReturn);
        DtoOptInSubscribers ListSubscribers(DataTablesRequest dataTablesRequest, string columnsToReturn, int listId);
        IEnumerable<OptInSubscriberList> ListListsSubscribers(int newsLetterID);
        bool AddListToSubscriber(int subscriberId, int listId, bool confirmed, bool useHTML, string ipAddress);
        bool RemoveListFromSubscriber(int subscriberId, int listId);

        bool DeleteList(int listId);
        bool EditList(OptInList listToEdit);
        OptInList GetList(int listId);
        bool CreateList(OptInList listToCreate);
        DtoOptInLists ListLists(DataTablesRequest dataTableParam, string columnsToReturn);
        IEnumerable<OptInList> ListLists();

        bool SendNewsLetter(int newsLetterId, int subscriberId);
        bool DeleteNewsLetter(int newsLetterId);
        bool EditNewsLetter(OptInNewsLetter newsLetterToEdit);
        OptInNewsLetter GetNewsLetter(int newsLetterId);
        bool CreateNewsLetter(OptInNewsLetter newsLetterToCreate);
        DtoOptInNewsLetters ListNewsLetters(DataTablesRequest dataTableParam, string columnsToReturn);

        bool AddListToNewsLetter(int newsLetterId, int listId);
        bool RemoveListFromNewsLetter(int newsLetterId, int listId);
    }
}